from flask import Blueprint, render_template
from models import house
detail_page = Blueprint('detail_page', __name__)


@detail_page.route('/house/<int:hid>')
def datail(hid):
    house1 = house.query.get(hid)
    facilities_str = house1.facilities
    facilities_list = facilities_str.split('-')
    print(house)
    return render_template('detail_page.html',house=house1,
                                            facilities=facilities_list)
